﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IServer
    {
        [OperationContract]
        string IsValidLoginPassword(string login, string password);

        [OperationContract]
        string RegistryLogin(string login, string password, string post, int salary);

        [OperationContract]
        string SetPost(string login, string Post);

        [OperationContract]
        string SetMode(string login, string Mode);

        [OperationContract]
        string SetPassword(string login, string password);

        [OperationContract]
        string SetSalary(string login, int Salary);

        [OperationContract]
        void DeleteWorker(string login);

        [OperationContract]
        IEnumerable<User> GetUsers();
    }

    [DataContract]
    public class User
    {
        [DataMember] public string Name;
        [DataMember] public string Post;
        [DataMember] public int Salary;
    }
}
